#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void stat(float x[]);//函数声明

int count1 = 0;//优秀人数
int count2 = 0;//良好人数
int count3 = 0;//中等人数
int count4 = 0;//及格人数
int count5 = 0;//不及格人数

int main()
{
	int i = 0;
	float arr[20] = { 0.0 };
	printf("Please input scores:\n");
	for (i = 0; i < 20; i++)
	{
		scanf("%f", &arr[i]);
	}
	stat(arr);
	return 0;
}
void stat(float x[])
{
	int i = 0;
	for (i = 0; i < 20; i++)
	{
		if (x[i] >= 90 && x[i] <= 100)
		{
			count1++;
		}
		else if (x[i] >= 80 && x[i] <= 89)
		{
			count2++;
		}
		else if (x[i] >= 70 && x[i] <= 79)
		{
			count3++;
		}
		else if (x[i] >= 60 && x[i] <= 69)
		{
			count4++;
		}
		else
		{
			count5++;
		}
	}
	printf("优秀的人数有%d\n", count1);
	printf("良好的人数有%d\n", count2);
	printf("中等的人数有%d\n", count3);
	printf("及格的人数有%d\n", count4);
	printf("不及格的人数有%d\n", count5);
}